package com.cloudloan.enmus;

import io.swagger.models.auth.In;

public enum StatusName {
    TAKE_EFFECT(0,"生效"),
    INVALID(1,"失效");
    private final Integer code;
    private final String name;

    StatusName(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
    public static String getName(int code){
        switch (code){
            case 0:
                return TAKE_EFFECT.getName();
            case 1:
                return INVALID.getName();
            default:
                return "未识别的code";
        }
    }
}
